package org.websocket.demo;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

@Controller
public class WebSocketController {
    @MessageMapping("/welcome")
    @SendTo("/topic/getMessage")
    public ReponseMessage test(MessageBean message)
    {
        return new ReponseMessage("我是来自服务器的webScoket消息："+message.getMymessage());
    }
}
